using System;

using NetBpm.Workflow.Definition.Attr;
using NetBpm.Workflow.Delegation;

namespace BEGDC.CC.BL.Workflow
{
	/// <summary>
	/// Summary description for Decision.
	/// </summary>
	public class CCDecision : IDecisionHandler
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="decisionContext"></param>
		/// <returns></returns>
		public String Decide(IDecisionContext decisionContext)
		{

			String attributeName = (String) decisionContext.GetConfiguration()["transition"];
			Object attributeValue = decisionContext.GetAttribute(attributeName);
			string trans = (string)attributeValue;
//			if ((trans != WorkTransition.Submit) && (trans != WorkTransition.Query) && (trans != WorkTransition.Drawback))
//				trans = WorkTransition.Redirect;
			return trans;
		}
	}
}
